<?php

declare(strict_types=1);

namespace app\common\model\goods;

use Dengje\Pxy\BaseModel;

class GoodsModel extends BaseModel
{
    protected $name = 'goods';

    public function getImgsAttr($value)
    {
        return $value ? explode(',', $value) : [];
    }

    public function setImgsAttr($value)
    {
        return is_array($value) ? implode(',', $value) : '';
    }

    public function getTagsAttr($value)
    {
        return $value ? explode(',', $value) : [];
    }

    public function setTagsAttr($value)
    {
        return is_array($value) ? implode(',', $value) : '';
    }
}
